package com.xw.childhealth.service.impl;

import com.xw.childhealth.dao.XqHospitalDao;
import com.xw.childhealth.entity.XqHospital;
import com.xw.childhealth.service.XqHospitalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description:
 * @Author: y
 * @CreateDate: 2019-11-20 15:47
 * @Version: 1.0
 */
@Service
public class XqHospitalServiceImpl implements XqHospitalService {

    @Autowired
    private XqHospitalDao xqHospitalDao;

    @Override
    public List<XqHospital> findByParentIdEquals(Integer id) {
        return xqHospitalDao.findByParentIdEquals(id);
    }

    @Override
    public XqHospital findByIdEquals(Integer id) {
        return xqHospitalDao.findByIdEquals(id);
    }

    @Override
    public void delRecord(Integer id) {
        xqHospitalDao.deleteById(id);
    }

    @Override
    public XqHospital save(XqHospital obj) {
        return xqHospitalDao.save(obj);
    }
}
